<!--<md-content layout-padding>-->
<!--<div layout="column">-->
<!--<md-input-container>-->
<!--<label>题目</label>-->
<!--<input ng-model="question.name">-->
<!--</md-input-container>-->
<!--<md-input-container>-->
<!--<label>A</label>-->
<!--<input ng-model="question.extras[0]">-->
<!--<md-checkbox ng-model="question.answers[0]">-->
<!--{{ }}-->
<!--</md-checkbox>-->
<!--</md-input-container>-->
<!--<md-input-container>-->
<!--<label>B</label>-->
<!--<input ng-model="question.extras[1]">-->
<!--</md-input-container>-->
<!--<md-input-container>-->
<!--<label>C</label>-->
<!--<input ng-model="question.extras[2]">-->
<!--</md-input-container>-->
<!--<md-input-container>-->
<!--<label>D</label>-->
<!--<input ng-model="question.extras[3]">-->
<!--</md-input-container>-->
<!--<md-input-container>-->
<!--<label>答案</label>-->
<!--<input ng-model="answer">-->
<!--</md-input-container>-->
<!--<md-button ng-click="submit()">确认提交</md-button>-->
<!--</div>-->
<!--</md-content>-->

<form name="userForm" layout-padding>
    <md-content flex="initial" layout="row" layout-align="center center">
        <span>填空题</span>
        <md-switch class="md-primary" md-no-ink aria-label="{{questionType[questionInstance.type]}}" ng-model="type"
                   ng-click="switchType()" layout-align="center center" title="切换题目类型">
        </md-switch>
        <span>选择题</span>
    </md-content>
    <div >
        <md-content flex="grow" layout-padding layout-align="center none" layout="column">


            <md-input-container>
                <label>题目</label>
                <textarea required ng-model="questionInstance.name"  md-select-on-focus></textarea>
            </md-input-container>
        </md-content>
        <md-content  >
            <div layout="row" ng-repeat="x in contents track by $index" >
                <md-checkbox aria-label="check" ng-model="x.answer" ng-disabled="!type" ng-hide="showCheckbox" layout-align="center center"
                             title="设为正确答案">
                </md-checkbox>
                <md-input-container flex>
                    <label ng-hide="!type">{{String.fromCharCode('A'.charCodeAt(0)+$index)+"."}}</label>
                    <label ng-hide="type">第{{$index+1}}个空</label>
                    <input ng-model="x.extras">
                </md-input-container>
                <md-button ng-click="btnRemoveContent($index)" >
                <md-icon class="material-icons md-secondary"
                          title="删除这一栏">
                    delete
                </md-icon>
                </md-button>
            </div>
        </md-content>

        <md-button class="md-fab" id="fab" title="添加一栏" ng-click="btnNewContent()">
            <md-icon class="material-icons">add</md-icon>
        </md-button>
    </div>
    <md-content layout="row" layout-xs="column" layout-align="center center">
        <md-button ng-hide="!type" class="md-raised md-secondary" ng-click="chooseCorrect()">
            选择正确答案
        </md-button>
        <md-button class="md-raised md-primary" ng-click="submit()">
            确认提交
        </md-button>
    </md-content>
</form>
